/**
 * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
 * SPDX-License-Identifier: MIT
 */

import { WorkflowNodeRegistry } from '@flowgram.ai/free-layout-editor';

/**
 * You can customize your own node registry
 * 你可以自定义节点的注册器
 */
export const nodeRegistries: WorkflowNodeRegistry[] = [
  // {
  //   type: 'start',
  //   meta: {
  //     isStart: true, // Mark as start
  //     deleteDisable: true, // The start node cannot be deleted
  //     copyDisable: true, // The start node cannot be copied
  //     defaultPorts: [{ type: 'output' }], // Used to define the input and output ports, the start node only has the output port
  //   },
  // },
  {
    type: 'condition',
    meta: {
      defaultPorts: [{ type: 'input' }],
      useDynamicPort: true, //动态端口设置, 详见user-editor-props.tsx中materials
    },
  },
  // {
  //   type: 'end',
  //   meta: {
  //     deleteDisable: true,
  //     copyDisable: true,
  //     defaultPorts: [{ type: 'input' }],
  //   },
  // },
  {
    type: 'asset_edit',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }], // 默认可用的两个连接口
    },
  },
  {
    type: 'section_edit',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
  {
    type: 'entrust_edit',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
  {
    type: 'public_edit',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
  {
    type: 'confirm_listed',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
  {
    type: 'deal_confirm',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
  {
    type: 'deal_notice',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
  {
    type: 'deal_voucher',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
  {
    type: 'money_receive',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
  {
    type: 'money_transfer',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
  {
    type: 'pause',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
  {
    type: 'end',
    meta: {
      defaultPorts: [{ type: 'output' }, { type: 'input' }],
    },
  },
];
